yjx.controller('courseIntroController',['$rootScope','$scope','$fetch','$stateParams','modalService','$timeout',function($rootScope,$scope,$fetch,$stateParams,modalService,$timeout) {
    var id = $stateParams.id;
    //$scope.name = "jjjj"
    //$scope.bannerDetail = null;
    function getDetail() {
        $fetch.fetch(
            '/settled/course',
            {
                params:{
                    id:id
                },
            }
        ).then(function(data){
                $timeout( function() {
                    if(data && data.course && data.course.length > 0) {
                        $scope.data = data.course[0];
                    }else{
                        modalService.mainMsgInfo("数据库中不存在该活动介绍");
                    }
                })

            }
        ).catch(function(e){
                modalService.mainMsgInfo(e.msg);
            })
    }
    getDetail();
}])